#include "EPubBasicContainerImp.h"
#include "EPubUtil.h"

EPubPointer<IEPubBuffer> EPubBasicContainerImp::Serialize() const
{
	return NULL;
}

EPUB_Result EPubBasicContainerImp::Deserialize(const EPubPointer<IEPubBuffer> buffer)
{
	EPUB_Result ret = EPUB_SUCCESS;

	TiXmlDocument doc;
	doc.Parse((const char *)buffer->GetBuffer());

	const TiXmlElement *elem_root_file = NULL;
	EPub_Xml_Element(&doc, "container>rootfiles>rootfile", &elem_root_file);
	EPub_Xml_Attribute(elem_root_file, "full-path", m_RootFile);
	return ret;
}